<%--
 *  File:    DataCleanManualErrorFile.jsp
 *  @Author: Jamesli
 *  Date:    2010/07/21
 *
 *  Copyright (C) 2000 - 2010 Oval Technologies, Inc.
 *  All rights reserved. 
 *
 *  This software is the confidential and proprietary information of Oval 
 *  Technologies, Inc. ("Confidential Information").  You shall not
 *  disclose such Confidential Information and shall use it only in
 *  accordance with the terms of the license agreement you entered into
 *  with Oval.
--%>

<%@ include file="/inc/SessionTimeout.inc"%>
<%@ page language="java" %>     
<%@ page import="java.util.*" %>
<%@ page import="org.apache.log4j.Category" %>

<%@ page contentType = "text/html;charset=UTF-8" %>
<%@ taglib uri="/WEB-INF/PageFlow.tld" prefix="PageFlow" %>
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
<%@ taglib uri="/WEB-INF/custom.tld" prefix="custom" %>
<% //--------------------------------------  setting logger --%>
<%
  	Category cat = Category.getInstance("jsp.DataCleanManualErrorFile"); 

  //init param
  String strModuleName = "CM";
  String privilegeCode = "E0212";
  String contextPath = request.getContextPath();
%>  
<% //--------------------------------------  include files list --%>
<%@ include file="/inc/FrmDefault.inc" %>
<%@ include file="/inc/PageDefault.inc" %>
<%@ include file="/inc/LocationDefault.inc" %>

<html>
<head>
<title>DataCleanManualErrorFile</title>
<PageFlow:CheckPageFlow pageName="p_datacleanmanualerrorfile"/>
<link rel="stylesheet" href="<%=contextPath %>/css/<%= strLanguageCode %>/main.css" type="text/css">
<script language="JavaScript" src="<%=contextPath %>/css/<%= strLanguageCode %>/script.js"></script>
<script language="JavaScript" src="<%=contextPath %>/js/ScriptLib.js"></script>
<%@ include file="/inc/SummaryDivision.inc" %>
<script>
function page_summary(actionvalue,orderbyname)
{
  var editform = summaryPrepare(cform,actionvalue,orderbyname);
  editform.action = "DataCleanManualErrorFile.jsp?<%= OvalTools.randomURL() %>";
  editform.target = "_self";
  isRunning = true;
  editform.submit();  
}

function page_detail(id){
	var tempid = cform.tempid.value;
  self.location.href = "DataCleanManualErrorFileDetail.jsp?<%= OvalTools.randomURL() %>&datafileid=" + id + "&processtype=" + cform.processtype.value + "&tempid=" + tempid;
}

var popwindow;

function page_checkstatus(id,checkstatus){
	var processtype = cform.processtype.value;
	if(popwindow!=null) popwindow.close();
	popwindow = window.open('CheckStatus.jsp?<%= OvalTools.randomURL() %>&fileid=' + id + '&processtype=' + processtype + '&checkstatus=' + checkstatus,'newwindow1', 'height=400, width=500,top=100,left=100,toolbar=n0, menubar=no, scrollbars=yes, resizable=no, location=no, status=no');
}

</script>
</head>
<% //--------------------------------------  page location --%>
	<%@ include file="/inc/PageLocation.inc" %>
<body>
<iframe id="reloadHandler" name="reloadHandler" style="display:none"></iframe>
<table width="100%" cellspacing="0" border="0" cellpadding="0">
<form name="cform" method="post" action="<%=contextPath %>/Dispatcher"  target="_self">
	<input type="hidden" name="pagename" value="p_datacleanmanualerrorfile">
	<input type="hidden" name="actionname">
	<custom:hidden property="tempid"/>
	<custom:hidden property="processtype"/>
	<custom:hidden property="languagecode" scope="session"/>
  <tr> 
    <td> 
      <table width="100%" border="1" cellpadding="0" bordercolorlight="#999999" bordercolordark="#FFFFFF" cellspacing="0" align="center">
         <tr  class="deepblue-left"> 
            <td width="*" class="title_center"><%= label.getLabelName("L_filename")%></td>
            <td width="20%" class="title_center"><%= label.getLabelName("L_Partner") %></td>
            <td width="5%" class="title_center"><%= label.getLabelName("L_BatchNumber") %></td>
            <td width="5%" class="title_center"><%= label.getLabelName("L_TotalData") %></td>
            <td width="5%" class="title_center"><%= label.getLabelName("L_DeleteNum") %></td>
            <td width="5%" class="title_center"><%= label.getLabelName("L_FileStatus") %></td>
            <td width="10%" class="title_center"><%= label.getLabelName("L_CheckStatus") %></td>
            <td width="10%" class="title_center"><%= label.getLabelName("L_AcceptDate") %></td>
         </tr>
         <%
             int j = 0;
             String strClassType = new String(); 
             Vector totalsummary = (Vector)pageContext.getAttribute("totalsummary");
             if(totalsummary == null) totalsummary = new Vector();
          %>
          <logic:iterate id="summary" collection="<%= totalsummary %>">                      
         <%
            HashMap summaryMap = (HashMap)pageContext.getAttribute("summary");
            if(summaryMap == null) summaryMap = new HashMap();
            String strIsChecked = new String("");
            
            if(j%2 == 1){
              strClassType = "td-listrom";             
            }else{                    
              strClassType = "";
            }
              
            j++;     
          %>
           <tr onmouseover="this.className='tr-over'" onmouseout="this.className='<%=JspHelper.filterNull(strClassType)%>'" class="<%=JspHelper.filterNull(strClassType)%>">
            <td>&nbsp;<A onclick="page_detail('<custom:write property="fileid" name="summary"/>')"><custom:write property="filename" name="summary"/></A></td>
            <td>&nbsp;<custom:write property="shortname" name="summary"/></td>
            <td>&nbsp;<custom:write property="batchno" name="summary" nbsp="true"/></td>
            <td>&nbsp;<custom:write property="totalqty" name="summary" nbsp="true"/></td>
            <td>&nbsp;<custom:write property="deleteqty" name="summary" nbsp="true"/></td>
            <td>&nbsp;<custom:write property="filestatus" name="summary" nbsp="true" dictType="Status"/></td>
            <td>&nbsp;<A onclick="page_checkstatus('<custom:write property="fileid" name="summary"/>','<custom:write property="checkstatus" name="summary"/>')"><custom:write property="checkstatus" name="summary" nbsp="true"/></A></td>
            <td>&nbsp;<custom:write property="receivedate" name="summary" nbsp="true" dataType="date" dataFormat="yyyy-MM-dd"/></td>
          </tr>
          </logic:iterate>
      <% //--------------------------------------  flipping page --%>
      <%@ include file="/inc/SummaryAction.inc" %>
      </table>
      <table width="100%" cellspacing="0" cellpadding="0">
        <tr> 
          <td class="summary_top"></td>
        </tr>
        <tr> 
          <td class="td_center">
            <a onclick="window.close()"><custom:button type="1" label="L_Close" imgsrc="edit.gif" border="0" style="width:60"/></a>
          </td>
        </tr>
      </table>
    </td>
  </tr>
  </form>
</table>
</body>
</html>